TDLAS second harmonic demodulation based on Hilbert transform

A demodulation method for tunable diode laser absorption spectroscopy (TDLAS) second harmonic based on the Hilbert transform is proposed in this paper. The second harmonic of the TDLAS signal can be easily obtained without a reference signal. The TDLAS signal is firstly processed by band-pass filtering, then the envelope of the processed signal is obtained with Hilbert transform. And finally, the second harmonic is extracted from the 1f component of the envelope. The validity of the proposed method is confirmed by simulation and verified by experiment, and the result shows that the error is acceptable under the cases of weak absorbance, which indicates that the proposed method is applicable to practical trace gas detection.

In this paper, a TDLAS second harmonic signal demodulation method based on double Hilbert transform (HT) is proposed. And the second harmonic of the TDLAS signal can be easily obtained without reference signal. The proposed method needs no information about TDLAS signal except modulation frequency to set the passband of the filter.

Theory of TDLAS
The theory of TDLAS will facilitate the derivation of the proposed method which will be presented in the next subsection. In WMS, the output wavelength of laser diode is simultaneously modulated by a slowly varying scanning signal and a high frequency modulation signal. The wavenumber of the light emitted by the diode laser can be expressed as Where v c (t) is the center light wavenumber and it is modulated by a sawtooth. Δv is the modulation depth of the frequency modulation.
The relationship between the transmitted light intensity after passing through the gas and the emitted light intensity is Where α(v) is the absorbance; I t and I o are the transmitted and emitted light intensity; P (in atm) is the total gas pressure; S(T) (in cm -2 /atm) is the line strength at temperature of T (in K); ϕ(v) (in cm) is the line profile; C (in ppm) and L (in cm) are the concentration of gas and the length of light path, respectively; and A k is the k-th order Fourier component of transmittance.
The modulation of laser emission frequency is achieved by changing the injection current, which actually modulates the laser frequency and light intensity simultaneously, and this produce a gas independent background signal called residual amplitude modulation (RAM). And there is a phase delay between the frequency modulation and the intensity modulation [17][18][19]. The intensity of the light emitted by the diode laser can be expressed as: Where � I o ðtÞ is the average light intensity; i 1 is the linear intensity modulation depth, and it is proportional to Δv; ϕ 1 is the phase shift between frequency modulation and the intensity modulation. The nonlinearity of laser intensity modulation is considered negligible here.
In conclusion, the transmitted light intensity contains many harmonic components and can be expressed as: Where ; φ k is the phase of k-th order harmonic; H k denote the amplitude of k-th order harmonic component of the transmitted light intensity, which is a function of t. Since its frequency is much smaller than ω, and to simplify the expression, it is not written as H k (t) here.
As a result of RAM, there is a strong background signal in the signal H 1 [17]. Generally, the magnitude of H 1 is much larger than other high order harmonics, and the magnitude of H k diminishes quickly as the order goes up.

Hilbert transform
The Hilbert transform of the signal g(t), denoted asĝ ðtÞ, is the convolution of g(t) with the signal 1/πt. That is: Here are properties of the Hilbert transform that will be used later in the derivation. The orthogonality of Hilbert transform: after Hilbert transform, the amplitudes of the signal remain unchanged and the phases of the spectral components are shifted by -π/2. For example, the Hilbert transform of cos(t) is sin(t).
Bedrosian theorem [20]: Consider two signals g(t) and h(t) with nonoverlapping spectral in the frequency domain, and the Fourier transform of g(t) and h(t), denoted as G(f) and H(f) satisfy the following conditions: When | f |>W, G(f) = 0; and | f |<W, H(f) = 0. Then To put it another way, if a signal s(t) can be expressed as the product of a low-pass signal and a high-pass signal with nonoverlapping spectra, the Hilbert transform of s(t) is the product of the low-pass signal and the Hilbert transform of the high-pass signal [21].

Principle of TDLAS second harmonic demodulation based on Hilbert transform
The process of second harmonic demodulation method based on Hilbert transform is shown in Fig 1. The demodulated signal is actually an approximate of the second harmonic. The third step "1f component extraction" in Fig 1 is actually implemented by bandpass filtering as well.
It is given by the Eq (4) that the transmitted light intensity I t (t) is as follows: I DC (t) is the low-frequency component in the transmitted light intensity signal. Before the processing of signal, the low-frequency component (frequency < ω) and high-order harmonic (frequency � 3ω) in I t (t) is removed by a band-pass filter. The remaining signal can be expressed as: Apply Hilbert transform to I(t), and getÎðtÞ. According to the properties of Hilbert transform mentioned above, the effect of Hilbert transform is to produce a π/2 phase delay in cos (kωt+φ k ), and the expression ofÎðtÞ is as follows: I(t) andÎðtÞ form the real and imaginary parts of an analytic signal z 1 (t) over the complex filed. The envelope of I(t) is: ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi I 2 ðtÞ þÎ 2 ðtÞ q ð10Þ Where I 2 ðtÞ andÎ 2 ðtÞ is expressed as follows: Substituting I 2 ðtÞ andÎ 2 ðtÞ into |z 1 (t)|, we obtain: ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi It is to be noted that in the case of weak absorbance, H 2 <<H 1 . We have: Replacing ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi with its Taylor expansion, we obtain: ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi The signal with frequency ω in |z 1 (t)| is easy to obtain by band-pass filtering. It is given as follows: When H 2 <<H 1 , Eq (15) can be approximated as: ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi Hence, Eq (14) indicates that for the second harmonic, the effect of the envelope extraction based on Hilbert transform is equivalent to a frequency reduction. It reduces the frequency of the second harmonic signal from 2ω to ω and maintains its intensity.

PLOS ONE
As shown above, the amplitude of |z 1 (t)| 1f is approximately equal to H 2 . The envelope of | z 1 (t)| 1f , denoted by |z 2 (t)|, can be expressed as: ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi The above approximation holds under the assumption that H 2 <<H 1 . Due to the strong RAM background signal in the first harmonic, in the weak absorbance condition, it is reasonable to assume that H 2 <<H 1 [22]. The approximation in Eq (16) is satisfied well in weak absorbance conditions (α(v 0 )<<10%). This will be verified in later simulations.

Simulation setup
The line shape function is described by the Lorentzian profile in the simulations: Where v 0 (in cm -1 ) is the central wavenumber and γ (in cm -1 ) is the half width at half maximum (HWHM) of the gas absorption line.
The simulation is based on the CO 2 absorption line at 2003.3 nm (4992.516 cm -1 ), because the intensity of the absorption line of CO 2 is high here, we use this line to detect carbon dioxide in our experiments. The modulation index m = Δv/γ is set to 2.2 to maximize the amplitude of second harmonic [23]. The parameters of the absorption line at 2003.3 nm are set according to the HITRAN database under the atmospheric pressure of 1 atm and temperature of 296 K. The line strength is 0.0306 cm -2 /atm, the γ is set as 0.0692 cm -1 . The length of the optical path in the simulation is set as 11mm according to the optical path length of the device used in the actual experiment.

Signal processing and result
Global average atmospheric carbon dioxide is about 400 ppm. Therefore, the carbon dioxide concentration in this simulation is set to 400 ppm (α(v 0 ) = 0.0062%). The second harmonic is demodulated by the proposed Hilbert transform based method. Fig 2 shows the signals in the signal processing of the proposed method.
The transmitted light signal in Fig 2(A) is firstly processed by band-pass filtering, and the result is presented in Fig 2(B); secondly, the envelop of processed signal, denoted as |z 1 (t)|, is extracted in Fig 2(C); then, the 1f component of |z 1 (t)| is obtained by band-pass filtering the | z 1 (t)| and presented in Fig 2(D).
The transmitted light signal in Fig 2(A) consists of low-frequency sawtooth wave and highfrequency harmonics (the figure shows the signal for only half of the scanning period), which are the common results of the intensity modulation of injection current and nonlinear absorption; In Fig 2(B), all signals except the first harmonic (1f) and second harmonic (2f) are filtered out, corresponding to Eq (8) ; Fig 2(C) is the envelope of the signal in Fig 2(B). Since the intensity modulation leads to a strong gas-independent RAM signal in the first harmonic, the envelope change in the figure is not obvious, the gas related signal can be seen by zooming on the vertical axis and looks like a lying "S" plus some high-frequency component. These high-frequency component is the second harmonic signal that is transformed to 1f, corresponding to Eq (16); Then the 1f component of |z 1 (t)| is obtained by band-pass filtering and presented in Fig 2(D). Fig 2(D), |z 1 (t)| 1f presents a profile highly similar to the second harmonic. Finally, the demodulated signal, that is, the envelop of |z 1 (t)| 1f is extracted by performing Hilbert transform to |z 1 (t)| 1f , and the result is presented in Fig 3. Subsequently, the second harmonic demodulated by the proposed method is compared to that of lock-in amplification in Fig 4. Fig 4(A) presents the second harmonic demodulated by Hilbert transform based method and lock-in amplifier in red and blue, respectively, and the two signals are highly coincident and almost overlap. Fig 4(B) shows the relative error curve with a relative error of almost 0% at the center of the second harmonic. The lock-in amplifier demodulated signal is taken as the true value.

As shown in
What stands out in Fig 4(B) is that the relative error increases gradually as the laser scans away from the center of the spectral line. This is due to the brick-wall bandpass filtering used in this simulation, which introduces a ringing artifacts error between the two signals. Fig 5  shows the error between the second harmonic demodulated by the two methods.
Therefore, the relative error increases gradually on both sides of the spectrum where the amplitude of the second harmonic gradually approaches zero. In spite of this, the data there is less important in practical applications. And satisfactory results have been obtained near the center of the spectral line.

Error under different absorbance
Furthermore, the Hilbert transform based method under different absorbance conditions has been tested. Fig 6 shows the relationship curve for the relative error at the center of the second harmonic and α(v 0 ) (the absorbance at the line center). In Fig 6, the absorbance at the line center varies from 0% to 5% with the concentration of CO 2 ascend to 32.29%. And other parameters are same with Fig 4. As shown in Fig 6, the relative error increases as the absorbance at the line center rises. The main reason is that with the increase of absorbance, the intensity of high order harmonics is

PLOS ONE
increasing relative to the first harmonic, and the approximation of Eq (16) is no longer satisfied. Nevertheless, the absolute relative error stay within 1% when the absorbance is no more than 3%, which indicated the proposed method is applicable to most trace gas detection cases.

Experiment
To verify the accuracy and validity of the proposed method, the second harmonic in a TDLAS signal obtained from an experiment is demodulated by the proposed method, and the result is compared with that of the lock-in amplification.
A DFB diode laser (nanoplus DFB TOP WL 2004.0 nm) is employed as the spectroscopic light source in the experiment. Its operating temperature is maintained at 40˚C by a temperature controller. A laser driver provides the injection current of the DFB diode laser: a sawtooth current (10 Hz) with an amplitude of 5 mA and a sinusoidal current (21 kHz) with an amplitude of 3.5 mA are added to a DC injection current of 70 mA to produce the scanning signal and the modulation signal. The output frequency of the laser scans from 4992.19 cm -1 to 4992.84 cm -1 , near the CO 2 absorption line at 4992.516 cm -1 (wavelength of 2002.998 nm).
The length of the light path between the laser and the detector is 11mm. In the experiment, the gas in a bottle containing a little coke was detected, and the concentration of the carbon dioxide is uncertain, probably around 15%.
The TDLAS signal is detected by an InGaAs photodiode (LSIPD26-1) and collected by a digital oscilloscope (Rigol DS1102Z-E) with a sampling frequency of 25 MHz. Then, the transmitted light intensity signal shown in Fig 7 is processed by the proposed method and lock-in amplification on a computer.

PLOS ONE
The modulation frequency f in this experiment was 21 kHz, and in the program the cutoff frequency of the first band-pass filtering was set as [0.5 � f, 2.5 � f], which is [10500 Hz, 52500 Hz], and the cutoff frequency of the second band-pass filtering was set as [0.8 � f, 1.2 � f], which is [16800 Hz, 25200 Hz]. The stability of the proposed algorithm mainly depends on the SNR of the second harmonic signal. In the case of low SNR, the passband bandwidth of bandpass filtering should be set narrower.
The results of both methods are compared in Fig 8(A) and 8(B) shows the relative error of the proposed method versus lock-in amplification. The relative errors at the center of the spectral line are all marked out in blue in Fig 8(B). The results are similar to those of simulation and the signals demodulated by the two methods are almost overlap. Except near the local minimum of the second harmonic, the relative error of other positions is less than 2%, and the relative error at the center of the second harmonic is 0.6~0.7%.

Conclusion
A Hilbert based demodulation method for second harmonic in TDLAS technology is proposed. As no reference signal is required, the proposed method benefits second harmonic demodulation with convenient operation and efficiency. Theoretical analysis of this method shows that the error of this method is positively correlated with the intensity of the higher harmonics relative to the first harmonics, and this is verified by simulations. The errors under different absorbance are analyzed by simulation, and the absolute relative error stay within 1% when the absorbance is below 3%, which shows that the peak value of the second harmonic is approximately linear with the gas concentration at weak absorbance conditions, and the proposed method is applicable to most trace gas detection cases. The accuracy of this method under low absorbance was verified by experiments and the codes and experiment data in this paper are all freely available as open source on GitHub (https://github.com/awublack/Hbt-TDLAS-secondHarmonic).